package ${package.Controller};
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import ${package.Service}.${table.serviceName};
import org.springframework.web.bind.annotation.*;
import xyz.labradormm.auth.domain.dto.Result;
import org.springframework.beans.factory.annotation.Autowired;
<#if restControllerStyle>
import org.springframework.web.bind.annotation.RestController;
<#else>
import org.springframework.stereotype.Controller;
</#if>
<#if superControllerClassPackage??>
import ${superControllerClassPackage};
</#if>

/**
 * <p>
 * ${table.comment!} 前端控制器
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Tag(name="${table.comment!}接口")
<#if restControllerStyle>
@RestController
<#else>
@Controller
</#if>
@RequestMapping("<#if package.ModuleName?? && package.ModuleName != "">/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle>${controllerMappingHyphen}<#else>${table.entityPath}</#if>")
<#if kotlin>
class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()</#if>
<#else>
<#if superControllerClass??>
public class ${table.controllerName} extends ${superControllerClass} {
<#else>
public class ${table.controllerName} {
</#if>


    @Autowired
    private ${table.serviceName} ${table.serviceName?substring(0,1)?lower_case}${table.serviceName?substring(1)};

    @Operation(summary="添加",description = "添加接口")
    @PostMapping("add")
    public Result add(){
        return Result.success();
    }

    @Operation(summary="编辑",description = "编辑接口")
    @PutMapping("edit")
    public Result edit(){
        return Result.success();
    }

    @Operation(summary="详情",description = "详情接口")
    @GetMapping("detail")
    public Result detail(@RequestParam(value="id") Integer id){
        return Result.success();
    }


    @Operation(summary="列表",description = "列表接口")
    @PostMapping("page")
    public Result page(){
        return Result.success();
    }

}
</#if>
